<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head(~{::title})">
    <title>搜索 | Saw96x's Blog</title>
</head>
<body>
<!--<img class="ui fluid image m-background">-->
<!--导航-->
<nav th:replace="_fragments :: menu(1)">
</nav>

<!--    中间内容-->
<div class="m-padded-tb-large m-opacity-mini m-container-small">
    <div class="ui container m-shadow-small">
        <!--        header-->
        <div class="ui top attached segment">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <h3 class="ui violet header">搜索结果</h3>
                </div>
                <div class="right aligned column">
                    共 <h2 th:text="${page.totalElements}" class="ui teal header m-inline-block m-text-thin"> 14 </h2> 个结果
                </div>
            </div>
        </div>
        <!--        博客列表-->
        <div class="ui top attached teal segment ">
            <div class="ui padded vertical segment m-padded-tb-large"  th:each="blog : ${page.content}">
                <div class="ui mobile reversed stackable grid">
                    <div class="ui eleven wide column">
                        <h3 class="ui header ">
                            <a href="#" class="m-black" target="_blank" th:href="@{/blog/{id}(id=${blog.id})}" th:text="${blog.title}">
                                你真的理解什么是财富自由吗？
                            </a>
                        </h3>
                        <p th:text="|${blog.description}。。。。。。|">
                            这些话就是测试用的，要看样式，别看这个文字，我相信你不会无聊的看这个吧。。。asdfasdfasdfasdfasdfasfdasdfasd
                        </p>
                        <div class="ui grid">
                            <div class="eleven wide column">
                                <div class="ui horizontal link list">
                                    <div class="item">
                                        <img src="https://unsplash.it/110/110?image=1004" th:src="@{${blog.user.avatar}}" alt=""
                                             class="ui avatar image">
                                        <div class="content">
                                            <div class="header" th:text="${blog.user.nickname}"><a href="#">南望96X</a></div>
                                        </div>
                                    </div>
                                    <div class="item">
                                        <i class="calendar icon"></i><span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2020-10-1</span>
                                    </div>
                                    <div class="item">
                                        <i class="eye icon"></i><span th:text="${blog.views}">2342</span>
                                    </div>
                                </div>
                            </div>
                            <div class="right aligned five wide column">
                                <a href="#" target="_blank" class="ui teal basic label" th:text="${blog.type.name}">认知升级</a>
                            </div>
                        </div>
                    </div>
                    <div class="ui five wide column">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                            <img src="https://unsplash.it/180/110?image=1005" th:src="@{${blog.firstPicture}}" alt="" class="ui fluid rounded image">
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <!--        分页条-->
        <div class="ui bottom attached segment" th:if="${page.totalPages}>1">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <a href="#" th:href="@{/search(page=${page.number}-1)}" th:unless="${page.first}" class="ui violet basic button">上一页</a>
                </div>
                <div class="right aligned column">
                    <a href="#" th:href="@{/search(page=${page.number}+1)}" th:unless="${page.last}" class="ui violet basic button">下一页</a>
                </div>
            </div>
        </div>
    </div>
</div>
<br>
<br>
<br>
<br>
<br>
<!--    底部-->
<footer th:replace="_fragments :: footer">
</footer>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<script crossorigin="anonymous" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
        src="https://lib.baomitu.com/jquery/3.3.1/jquery.min.js"></script>

<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });
</script>
<script type="text/javascript" color="0,0,255" opacity='1' zIndex="-1" count="150"
        src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>
<th:block th:replace="_fragments :: script"></th:block>
</body>
</html>
